<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>装载一个 Typelib</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.com-isenum.html">com_isenum</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.com-load.html">com_load</a></div>
 <div class="up"><a href="ref.com.html">COM 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.com-load-typelib" class="refentry">
   <div class="refnamediv">
    <h1 class="refname">com_load_typelib</h1>
    <p class="verinfo">(PHP 4 &gt;= 4.1.0, PHP 5)</p><p class="refpurpose"><span class="refname">com_load_typelib</span> &mdash; <span class="dc-title">装载一个 Typelib</span></p>

   </div>
   
   <div class="refsect1 description" id="refsect1-function.com-load-typelib-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">bool</span> <span class="methodname"><strong>com_load_typelib</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$typelib_name</code></span>
   [, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$case_insensitive</code><span class="initializer"> = true</span></span>
  ] )</div>

      <p class="para rdfs-comment">
   Loads a type-library and registers its constants in the engine, as though
   they were defined using <span class="function"><a href="function.define.html" class="function">define()</a></span>.
  </p>
  <p class="para">
   Note that it is much more efficient to use the <a href="com.configuration.html#ini.com.typelib-file" class="xref"></a> configuration setting to pre-load and
   register the constants, although not so flexible.
  </p>
  <p class="para">
   If you have turned on <a href="com.configuration.html#ini.com.autoregister-typelib" class="xref"></a>, then
   PHP will attempt to automatically register the constants associated with a
   COM object when you instantiate it.  This depends on the interfaces
   provided by the COM object itself, and may not always be possible.
  </p>
   </div>


 <div class="refsect1 parameters" id="refsect1-function.com-load-typelib-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">typelib_name</code></em></dt>

     <dd>

      <p class="para">
       <em><code class="parameter">typelib_name</code></em> can be one of the following:
       <ul class="itemizedlist">
        <li class="listitem">
         <p class="para">
          The filename of a <em>.tlb</em> file or the executable module
          that contains the type library.
         </p>
        </li>
        <li class="listitem">
         <p class="para">
          The type library GUID, followed by its version number, for example
          <em>{00000200-0000-0010-8000-00AA006D2EA4},2,0</em>.
         </p>
        </li>
        <li class="listitem">
         <p class="para">
          The type library name, e.g. <em>Microsoft OLE DB ActiveX Data
          Objects 1.0 Library</em>.
         </p>
        </li>
       </ul>
       PHP will attempt to resolve the type library in this order, as the
       process gets more and more expensive as you progress down the list;
       searching for the type library by name is handled by physically
       enumerating the registry until we find a match.
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">case_insensitive</code></em></dt>

     <dd>

      <p class="para">
       The <em><code class="parameter">case_insensitive</code></em> behaves in the same way as
       the parameter with the same name in the <span class="function"><a href="function.define.html" class="function">define()</a></span>
       function.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.com-load-typelib-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code>TRUE</code></strong>， 或者在失败时返回 <strong><code>FALSE</code></strong>。
  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.com-isenum.html">com_isenum</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.com-load.html">com_load</a></div>
 <div class="up"><a href="ref.com.html">COM 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
